home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / MacOS / QuickDraw™ 3D 1.0.6F4 SDK / Development / 3DMF parser / 1.0 version / MF3DPC / MFMEMORY.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-07  |  1.5 KB  |  61 lines  |  [TEXT/dosa]

  1. #ifndef MF3D_MEMORY_H
  2. #define    MF3D_MEMORY_H
  3. /*==============================================================================
  4.  *
  5.  *    File:        MFMEMORY.H
  6.  *
  7.  *    Function:    Memory allocation routines.
  8.  *
  9.  *    Version:    Metafile:    Version 1.0 3DMF files
  10.  *                Package:    Release #2 of this code
  11.  *
  12.  *    Author(s):    Rick Wong (RWW), Duet Development Corp.
  13.  *                John Kelly (JRK), Duet Development Corp.
  14.  *
  15.  *    Copyright:    (c) 1995 by Apple Computer, Inc., all rights reserved.
  16.  *
  17.  *    Change History (most recent first):
  18.  *        FB7_JRK    Pragma macros
  19.  *        FAK_JRK    Added error debugging when DEBUG > 0
  20.  *        Fabio    Changed file name to 8 characters
  21.  *        F3L_RWW    File created.
  22.  *==============================================================================
  23.  */
  24. #if defined(applec) || defined(__MWERKS__) || defined(THINK_C)
  25. #pragma once
  26. #endif
  27.  
  28.  
  29. #if defined(DEBUG) && DEBUG > 1
  30. #include <stdio.h>
  31. #endif
  32. #include <stdlib.h>
  33.  
  34. #include "MFSYSTYP.H"        /* MF3DUns32 */
  35.  
  36. #if defined(DEBUG) && DEBUG > 1
  37. #ifdef MF3D_MEMORY_C
  38. int gMallocCount = 0;
  39. #else
  40. extern int gMallocCount;
  41. #endif
  42. #endif
  43.  
  44. #if defined(DEBUG) && DEBUG > 0
  45. #ifdef MF3D_MEMORY_C
  46. MF3DUns32 gMallocSize = 0;
  47. #else
  48. extern MF3DUns32 gMallocSize;
  49. #endif
  50. #endif
  51.  
  52. void *MF3D_Malloc(MF3DUns32 size);
  53. void *MF3D_Realloc(void *ptr, MF3DUns32 size);
  54. void MF3D_Free(void *ptr);
  55.  
  56. #if !defined(MF3D_MEMORY_C) && defined(DEBUG) && DEBUG > 1
  57. #define MF3D_Malloc(x)    (printf("File \"%s\"; Line %d\n", __FILE__, __LINE__), MF3D_Malloc(x))
  58. #endif
  59.  
  60. #endif
  61.